package main

import (
	"github.com/robfig/cron/v3"
	"goDIPParse/gt"
	"log"
)

//dnspod:ca8d91841dda7fa9627abf215c1cf0b5
//dnspod id:123051

func main() {
	defer gt.Loggerzap.Sync()

	c := cron.New(cron.WithSeconds())
	if gt.DnsPodEnable {
		_, err := c.AddFunc(gt.CronSpec, gt.DnsPodStart)

		if err != nil {
			log.Fatal(err)
		}

		gt.Loggerzap.Info("开始运行DnsPod动态IP域名更新...")

		go c.Start()
		defer c.Stop()

	} else {
		return
	}

	//禁止退出main
	select {}

}
